<?php
if(isset($_REQUEST['id']))
{
	$eventdata = $data->getEventData($_REQUEST['id']);
	$raiddata = $data->getSetupRaidData($eventdata['raidid']);
	$istancedata = $data->getIstanceData($eventdata['istanceid']);
	$istancestatisticdata = $data->geIstanceStatisticData($eventdata['istanceid']);
	$roledata = $data->getAllRoleClean();
	$signupstatistic = $data->getSignupIstanceStatistic($_REQUEST['id']);
			
	
			
	$eventinfo = el::elDivBox("eventinfo","Informazioni Evento <b>".$eventdata['eventname']."</b>", 
		el::elFieldset('Orari Evento',
			el::elFieldvalue("Scadenza Iscrizioni",sys::getdate($eventdata['duedate'], 'full'))
			.el::elC()
			.el::elFieldvalue("Inizio Raid",sys::getdate($eventdata['startdate'], 'full'))
			.el::elC()
			.el::elFieldvalue("Fine Raid",sys::getdate($eventdata['enddate'], 'full'))
		)	
		.el::elFieldset('Opzioni Evento',
			el::elFieldvalue("Solo Personaggi Main?",($eventdata['onlymain'] == 1)?'SI':'NO')
			.el::elC()
			.el::elFieldvalue("Solo Spec Primarie?",($eventdata['onlyprimaryspec'] == 1)?'SI':'NO')
			//.el::elC()
			//.el::elFieldvalue("Setup Raid","Tank:(".$raiddata['raidmaxtank']."/0)+10 DPS:(".$raiddata['raidmaxdps']."/0)+10 Healer:(".$raiddata['raidmaxhealer']."/0)+10")
		)	
		.el::elFieldset('Commento',$eventdata['comment'])
	);
	
	$istancestatistic = el::elDivBox("istancestatistic","Informazioni Istanza <b>".$istancedata['istancename']."</b>", 
		el::elFieldset('Progress della Gilda',
			el::elFieldvalue("Stato dell'istanza",$istancedata['istancestatus'])
			.el::elC()
			.el::elFieldValue("Boss Totali",$istancestatisticdata['bosscount'])
			.el::elS(6)
			.el::elFieldValue("Boss Uccisi",$istancestatisticdata['bosskill'])
		)
		.el::elFieldset('Statistiche Istanza',
			el::elFieldvalue("Eventi avvenuti in questa istanza",$istancestatisticdata['istanceevent']." su ".$istancestatisticdata['countevent'])
			.el::elC()
			.el::elFieldValue("Utente pi&ugrave; presente",$istancestatisticdata['usertop']." ".$istancestatisticdata['usertopcount']." presenze")
			.el::elC()
			.el::elFieldValue("Personaggio pi&ugrave; presente", $istancestatisticdata['playertop']." ".$istancestatisticdata['playertopcount']." presenze")
			.el::elC()
			.el::elFieldValue("Tempo Totale speso in questa istanza in ore",$istancestatisticdata['istancegametime'])
		)
	);
	
	
	
	
	$content .= '<table border="0"  width="890px"><tr><td width="50%" align="center" valign="top">'.$eventinfo.'</td><td width="50%" align="center" valign="top">'.$istancestatistic.'</td></tr></table>'.el::elC(1);
	$content .= el::elDivBox("raidstatus","Stato del Raid", 
			el::elFieldvalue("Iscrizioni (Necessarie/Confermate)In coda","(10/0)9")
			.el::elS(4)
			.el::elFieldvalue("Tank","(2/0)1")
			.el::elS(4)
			.el::elFieldvalue("DPS","(5/0)5")
			.el::elS(4)
			.el::elFieldvalue("Healer","(3/0)3")
	);
	
	$content .= el::elHidden('eventid',$_REQUEST['id']);
	

	
	foreach($roledata as $rowRole)
	{
		$content .= el::elC(1).el::elDiv('div_tbl_confirmedpglist'.$rowRole['rolename'],'');
	}

	$content .= el::elC(1).el::elDiv('div_tbl_queuepglist','');
	$content .= el::elC(1).el::elDiv('div_tbl_outpglist','');
	$content .= el::elC(1).el::elDiv('div_box_signup','');
}
else
{
	$content .= el::elC(1).el::elDiv('div_tbl_eventlist','');
}
$jsmodule = "<script language=\"javascript\" type=\"text/javascript\" src=\"main/js/mod/jsSignup.js\" charset=\"iso-8859-1\"></script>\n";


include("theme/default/index.php");
?>